/*************************************************************************
	> File Name: oj-515.cpp
	> Author: Wang Bo
	> Mail: 1276106221@qq.com
	> Created Time: 2021年02月03日 星期三 11时09分01秒
 ************************************************************************/
#include <iostream>
using namespace std;

int main() {
    int a, b, l, ga, gb;
    double raw, rat = 9999999;
    cin >> a >> b >> l;
    raw = (double)a / b;
    for (int i = 1; i <= l; ++i) {
        for (int j = 1; j <= l; ++j) {
            double tmp = (double)i / j;
            if (tmp >= raw && tmp - raw < rat - raw) {
                rat = tmp;
                ga = i;
                gb = j;
            }
        }
    }
    cout << ga << " " << gb << endl;
    return 0;
}
